import request from '@/utils/request'

// 查询生产管理生产报工列表
export function listReport(query) {
  return request({
    url: '/prodmanage/report/list',
    method: 'get',
    params: query
  })
}

// 查询生产管理生产报工详细
export function getReport(reportId) {
  return request({
    url: '/prodmanage/report/' + reportId,
    method: 'get'
  })
}

// 新增生产管理生产报工
export function addReport(data) {
  return request({
    url: '/prodmanage/report',
    method: 'post',
    data: data
  })
}

// 修改生产管理生产报工
export function updateReport(data) {
  return request({
    url: '/prodmanage/report',
    method: 'put',
    data: data
  })
}

// 删除生产管理生产报工
export function delReport(reportId) {
  return request({
    url: '/prodmanage/report/' + reportId,
    method: 'delete'
  })
}

// 导出生产管理生产报工
export function exportReport(query) {
  return request({
    url: '/prodmanage/report/export',
    method: 'get',
    params: query
  })
}
// 导出生产管理生产报工
export function getWorkOrder(workno) {
  return request({
    url: '/prodmanage/report/getWorkOrder/'+workno,
    method: 'get',
  })
}

// 检验
export function setReportJy(reportId) {
  return request({
    url: '/prodmanage/report/setReportjy/' + reportId,
    method: 'get'
  })
}

// 获取验证码
export function getTmImg(workReportnoTs) {
  return request({
    url: '/prodmanage/report/reporttm/' + workReportnoTs,
    method: 'get'
  })
}
// 修改生产管理生产报工
export function Packing(reportId) {
  return request({
    url: '/prodmanage/report/packing/'+reportId,
    method: 'get',
  })
}